package com.example.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2017/5/9.
 */
@RestController
@RefreshScope
@RequestMapping("/test")
public class TestController {
    @Value("${driverClassName}")
    private String driverClassName;

    @Value("${user}")
    private String user;

    @Value("${password}")
    private String password;

    @Value("${url}")
    private String url;

    @RequestMapping("/getProperties")
    public String getProperties(){
        return driverClassName + url + user + password;
    }
}
